﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using F_MODEL;
using F_BLL;

namespace MvcApplication1.Controllers
{
    public class MoneyController : zyl_LoginController
    {
        UserInfoBll bll = new UserInfoBll();
        //
        // GET: /Money/
        //钱包首页
        [HttpGet]
        public List<UserInfo> UserInfoSel()
        {
            UserInfo m = new UserInfo();
            m = mod();
            int userId = 0;
            if(m!=null)
             userId = m.userId;
            List<UserInfo> list = bll.UserInfoMoneySel(userId);
            if (list.Count() == 0)
            {
                m.surplusMoney = 0;
                m.transactionMoney = 0;
                m.upcomingMoney = 0;
                m.youhui = 0;
                m.bankName = "无";
                list.Add(m);
            }
            return list;
        }

    }
}
